<template>
    <elm-page-tb>
        <template #top>
            <el-input placeholder="请查询输入内容" prefix-icon='el-icon-search' size="mini" style="width: 250px;" v-model="postData.name" clearable></el-input>
            <right>
                <el-button-group>
                    <el-button icon="el-icon-search" size="mini" @click="tablebinding()">查询</el-button>
                    <elm-open-button url="news_type_edit" icon="el-icon-edit" title="新增" width="700" height="450">新增</elm-open-button>
                </el-button-group>
            </right>
        </template>
        <elm-table url="/business/cms/news/type/GetData" :post-data="postData" :show-index="true">
            <el-table-column prop="name" label="分类名称" header-align="center"></el-table-column>
            <el-table-column prop="remark" label="备注" header-align="center"></el-table-column>
            <el-table-column prop="sort" label="顺序" width="80px" align="center"></el-table-column>
            <el-table-column fixed="right" label="操作" width="180px" align="center">
                <template v-slot="scope">
                    <elm-open-button url="news_type_edit" title="编辑" width="700" height="450" :data="{ model: scope.row }" type="text">编辑</elm-open-button>
                    <elm-delete-button type="text" size="mini" url="/business/cms/news/type/Delete" :data="{ id: scope.row.id }">删除</elm-delete-button>
                </template>
            </el-table-column>
        </elm-table>
    </elm-page-tb>
</template>

<script>
export default {
    extends: elmVueBase,
    data() {
        return {
            postData: { name: null },
        }
    },
    async created() {
    },
    methods: {
    }
}
</script>

<style scoped>
</style>